#pragma once


class CSaticFromBmp : public CStatic
{
public:
	CSaticFromBmp();
	virtual ~CSaticFromBmp();

	void Fresh();
	void GetBmpRect(CRect *p_bmpRect);
	void SetBmpRect(const CRect bmpRect);
	void SetBmp(HBITMAP hBitmap);
	void SetMouseFlag(BOOL mouseFlag);
	BOOL GetBitmapInfo(int *pbmpWidth, int *pbmpHeight);

protected:
	BOOL DrawBitmap(HDC hdcDest, CRect destRect, HBITMAP hBitmap, CRect srcRect, int mode);

	afx_msg void OnPaint();
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);

	DECLARE_MESSAGE_MAP()

protected:
	CRect   m_bmpRect;
	HBITMAP m_hBitmap;
	BOOL    m_mouseFlag;
};

